use glium::uniforms::{AsUniformValue, UniformValue};

#[derive(Copy, Clone)]
pub struct Vector3(pub f32, pub f32, pub f32);

impl Vector3 {
    pub fn zero() -> Self {
        Self(0.0, 0.0, 0.0)
    }

    pub fn as_array(&self) -> [f32; 3] {
        [self.0, self.1, self.2]
    }
}

impl AsUniformValue for Vector3 {
    fn as_uniform_value(&self) -> UniformValue {
        UniformValue::Vec3(self.as_array())
    }
}